<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <com-a>
      <template v-slot:default="dataObj">
        <p>{{dataObj.title}}</p>
        <p>{{dataObj.value}}</p>
      </template>
      <template v-slot:footer="dataObj">
        <p>{{dataObj}}</p>
      </template>
      <template v-slot:es6="{es6Value}">
        <p>{{es6Value}}</p> 
      </template>
    </com-a>
  </div>
</body>
<script src="./lib/vue.js"></script>
<script>
  Vue.component("ComA", {
    template: `
     <div>
        <slot :value="value" :title="title"></slot>
        <slot name='footer' :value="value" ></slot>
        <slot name='es6' :es6Value="es6Value" ></slot>
     </div>
    `,
    data() {
      return {
        title: '我是标题',
        value: '我是value',
        es6Value: '我是es6'
      }
    }

  })
  new Vue({
    el: "#app",
    data: {

    }
  })
</script>

</html>